#!/usr/bin/env python3

import socket

with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
    s.connect(("localhost", 12345))
    s.sendall(b"GET / HTTP/1.1\r\nHost: localhost\r\nAccept:text/html\r\n\r\n")
    print(str(s.recv(4096),'utf-8'))